﻿using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Text;
using GIMS.Def.Arguments;

namespace GIMS.GUI.ArgumentControls
{
    public class GravityArgumentControlViewModel
    {
        public GravityArgumentControlViewModel(GravityArgument gravityArgument)
        {
            Contract.Requires(null != gravityArgument);
            GravityArgument = gravityArgument;
        }

        public GravityArgument GravityArgument
        {
            get; private set;
        }

        public bool IsCenter
        {
            get { return GravityArgument.Gravity == Gravity.center; }
            set { if (value)GravityArgument.Gravity = Gravity.center; }
        }

        public bool IsNorthWest
        {
            get { return GravityArgument.Gravity == Gravity.northWest; }
            set { if(value)GravityArgument.Gravity=Gravity.northWest;}
        }

        public bool IsNorth
        {
            get { return GravityArgument.Gravity == Gravity.north; }
            set { if (value)GravityArgument.Gravity = Gravity.north; }
        }

        public bool IsNorthEast
        {
            get { return GravityArgument.Gravity == Gravity.northEast; }
            set { if (value)GravityArgument.Gravity = Gravity.northEast; }
        }

        public bool IsWest
        {
            get { return GravityArgument.Gravity == Gravity.west; }
            set { if (value)GravityArgument.Gravity = Gravity.west; }
        }

        public bool IsEast
        {
            get { return GravityArgument.Gravity == Gravity.east; }
            set { if (value)GravityArgument.Gravity = Gravity.east; }
        }

        public bool IsSouthWest
        {
            get { return GravityArgument.Gravity == Gravity.southWest; }
            set { if (value)GravityArgument.Gravity = Gravity.southWest; }
        }

        public bool IsSouth
        {
            get { return GravityArgument.Gravity == Gravity.south; }
            set { if (value)GravityArgument.Gravity = Gravity.south; }
        }

        public bool IsSouthEast
        {
            get { return GravityArgument.Gravity == Gravity.southEast; }
            set { if (value)GravityArgument.Gravity = Gravity.southEast; }
        }
    }
}
